package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.EmpTrainAddDTO;
import org.jsola.hr.dto.EmpTrainUpdateDTO;
import org.jsola.hr.query.EmpTrainQuery;
import org.jsola.hr.vo.EmpTrainListVO;
import org.jsola.hr.vo.EmpTrainVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-员工培训记录")
public interface IEmpTrainControllerAPI {

    /**
     * 新增员工培训记录
     * @param empTrainAddDTO 员工培训记录新增实体
     * @return 员工培训记录展示对象
     */
    @ApiOperation(value = "新增员工培训记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empTrainAddDTO", dataType = "EmpTrainAddDTO", value = "新增员工培训记录", paramType = "body")
    })
    Result<EmpTrainVO> save(EmpTrainAddDTO empTrainAddDTO);


    /**
     * 修改员工培训记录
     * @param empTrainUpdateDTO 员工培训记录
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工培训记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empTrainUpdateDTO", dataType = "EmpTrainUpdateDTO", value = "修改员工培训记录", paramType = "body")
    })
    Result<Integer> update(EmpTrainUpdateDTO empTrainUpdateDTO);




    /**
     * 删除单个员工培训记录，彻底删除
     * @param empTrainId 员工培训记录id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个员工培训记录，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empTrainId", dataType = "String", value = "员工培训记录id", paramType = "path")
    })
    Result<Integer> delete(String empTrainId);


    /**
     * 批量删除员工培训记录，彻底删除
     * @param empTrainIds 员工培训记录id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除员工培训记录，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empTrainIds", dataType = "String[]", value = "员工培训记录id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] empTrainIds);


    /**
     * 根据员工培训记录id查询员工培训记录详情
     * @param empTrainId 员工培训记录id
     * @return 员工培训记录详情
     */
    @ApiOperation(value="根据员工培训记录id查询员工培训记录详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empTrainId", dataType = "String", value = "员工培训记录id", paramType = "path")
    })
    Result<EmpTrainVO> findById(String empTrainId);


    /**
     * 查询员工培训记录
     * @param empTrainQuery 员工培训记录查询参数
     * @return page
     */
    @ApiOperation(value="查询员工培训记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empTrainQuery", dataType = "EmpTrainQuery", value = "员工培训记录查询参数", paramType = "query")
    })
    Result<List<EmpTrainListVO>> listAll(EmpTrainQuery empTrainQuery);


     /**
     * 分页查询员工培训记录
     * @param empTrainQuery 员工培训记录查询参数
     * @return page
     */
    @ApiOperation(value="分页查询员工培训记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empTrainQuery", dataType = "EmpTrainQuery", value = "员工培训记录查询参数", paramType = "query")
    })
    Result<Page<EmpTrainListVO>> page(EmpTrainQuery empTrainQuery);

    /**
     * 删除员工培训记录
     * @param empTrainId 员工培训记录id
     * @return 删除数量
     */
    @ApiOperation(value="删除员工培训记录")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empTrainId", dataType = "String", value = "员工教育经历id", paramType = "path")
    })
    Result<Integer> deleteEmpTrain(String empTrainId);


}

